package tech.aistar.mapper.deamnd;



import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import tech.aistar.entity.CategoryDetail;

import java.util.List;

/**
 * Created by 豆梦寒 on 2019/9/27.
 */
@Repository
public interface CategoryDetailMapper {

    @Select("select * from category_detail")
    List<CategoryDetail> findAl();
    /**
     * 根据category_id查找出所有相同id的需求
     * @param
     */

    @Select("select * from category_detail where category_id=#{value}")
    List<CategoryDetail> findAll(Integer category_id);

    /**
     * 根据id进行删除
     * @param id
     */
    @Update("update category_detail set status = 1 where id = #{value}")
    void delByCategoryId(Integer id);

    /**
     *  添加
     * @param
     */

    void addByCategoryId(CategoryDetail categoryDetail);

    /**
     *  更改
     * @param
     */

    void updateCategorydetail(CategoryDetail categoryDetail);
}
